{% extends "GairalAdminBundle::layout.html.twig" %}

{% block js %}
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.12&amp;sensor=true" id="mapsApi"></script>
{% javascripts '@fkMap' %}
<script src="{{ asset_url }}" type="text/javascript"></script>
{% endjavascripts %}
<script type="application/javascript">
    Fk.bind('load', function(){
        Fk.map.init(37.462841, -122.262053, 4);
        Fk.map.initSelectCoordOnMap('{{ form.lat.vars.id }}', '{{ form.lon.vars.id }}');
    });
</script>
{% endblock %}

{% block bodyAdmin %}
    <section id="adminTravelAdd" class="content">
        <h1>Add new Travel</h1>
        <form method="post" {{ form_enctype(form) }} class="well">
    {{ form_widget(form) }}
                <div id="map_canvas" style="height:400px;"></div>
                <div class="btn-toolbar">
                    <a href="{{ path('AdminTravel') }}" class="btn btn-info" title="Cancel">
                        <i class="icon-white icon-chevron-left"></i>
                        Cancel
                    </a>
                    <input type="submit" class="btn btn-primary" value="Save" />
                </div>
            </form>
        </section>
{% endblock %}